// JavaScript Document
var oDivb,DivUl;
window.onload=function(){
	
	//获得参数，购物车的商品显示
	var s0=window.localStorage.getItem("0");
		s1=window.localStorage.getItem("1");
	  	s2=window.localStorage.getItem("2");
	  	s3=window.localStorage.getItem("3");
	    s4=window.localStorage.getItem("4");
		s5=window.localStorage.getItem("5");
		s6=window.localStorage.getItem("6");
		s7=window.localStorage.getItem("7");
		s8=window.localStorage.getItem("8");
		
	//获取商品的全部信息，并通过传过来的参数判断显示
	var sh=document.getElementsByClassName("select_item_list"); 
	
	if(s0==0){
		sh[0].style.display="block";
		}
	if(s1==0){
		sh[1].style.display="block";
		}
	if(s2==0){
		sh[2].style.display="block";
		}
	if(s3==0){
		sh[3].style.display="block";
		}
	if(s4==0){
		sh[4].style.display="block";
		}
	if(s5==0){
		sh[5].style.display="block";
		}
	if(s6==0){
		sh[6].style.display="block";
		}
	if(s7==0){
		sh[7].style.display="block";
		}
	if(s8==0){
		sh[8].style.display="block";
		}

	//获得参数结束

	DivUl = document.getElementById("ul1");		//获取id为ul1的文档对象
}
//鼠标滑过改变字体
function MyOver(Mid){
	var str=Mid;		//将形参赋值给str方便下面id面板的获取
	oDivb = document.getElementById(str);
	//改变字体的颜色及加粗
	//oDivb.style.color='black';
	oDivb.style.fontWeight='600';
}
function MyOut(Mid){
	oDivb.style.color='#ffffff';
	oDivb.style.fontWeight='400';
}
//显示列表
function SD(){
	var Play=DivUl.style.display;
	if(!DivUl.style['-webkit-animation'])		//如果不为空值
	{
		DivUl.style.display = 'block';			//列表显示
		DivUl.style['-webkit-animation']='fadeInUp .4s linear .4s forwards';	//延时显示功能
	}else
	{
		DivUl.style.display = 'none';			//列表隐藏
		DivUl.style['-webkit-animation']=null;
	}
}
function OcOver(){
	DivUl.style.opacity = '1';		//透明度为1；
}
function OcOut(){
	DivUl.style.opacity = '0';
}
//返回顶部
function Top(){
	var Time = setInterval(function(){
		SetY = window.pageYOffset-50;
		scroll(0,SetY);
		if(window.pageYOffset<=0){window.clearInterval(Time);}
	},10);
	

}

	//删除购物车商品
function Delete(i){
	window.localStorage.removeItem(i.toString());
}